</head>
<body>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
	<h2 class="u-tt">{$action_name}跳转</h2>
	<ul id="tabs">
		<li> <a class="z-crt" href="#tab1"><span class="icon">&#xf05a;</span> 基本信息</a></li>
		<li> <a href="#tab2"> <span class="icon">&#xf0ad;</span> 高级设置</a></li>
		<li><a href="<?php echo url('admin/category/index') ?>"><span class="icon">&#xf101;</span> 栏目列表</a></li>
	</ul>
</div>
<div class="f-sep10"></div>
<div class="m-form">
	<form action="<?php echo url('admin_category/'.$action.'_save'); ?>" method="post" id="form">
		<fieldset>
			<div id="tab1">
				<div class="formitm">
					<label class="lab" >上级栏目：</label>
					<div class="ipt">
						<div class="txt">
							<select name="pid" id="pid"  datatype="*">
								<option value="0">=====顶级栏目=====</option>
								<!--foreach:{$category_list $vo}--> 
								<option <!--if:{$vo['cid']==$info['pid']}-->selected="selected"<!--{/if}--> value="{$vo.cid}">{$vo.cname}
								</option>
								<!--{/foreach}-->
							</select>
						</div>
						<span class="Validform_checktip"></span> </div>
				</div>
				<div class="formitm">
					<label class="lab" >栏目名称：</label>
					<div class="ipt">
						<input name="name" type="text" class="u-ipt" id="name" value="{$info.name}" datatype="s1-20" errormsg="栏目名称至少1~20个字符！" />
						<span class="Validform_checktip"></span>
					</div>
				</div>
				<div class="formitm">
					<label class="lab" >栏目形象图：</label>
					<div class="ipt">
						<input name="image" id="image" type="text" class="u-ipt" value="{$info.image}" /><span class="u-ico f-csp" id="image_button"><span class=" icon">&#xf093;</span> 上传</span>
					</div>
				</div>
                <div class="formitm">
					<label class="lab" >跳转地址：</label>
					<div class="ipt">
						<input name="url" id="url" type="text" class="u-ipt" value="{$page_info.url}" />
                        <span class="Validform_checktip">支持系统标签</span>
					</div>
				</div>
				<div class="formitm">
					<label class="lab" >页面顺序：</label>
					<div class="ipt">
						<input name="sequence" type="text" class="u-ipt" value="{$info.sequence isset="0"}" />
						<span class="Validform_checktip">数字越小栏目越靠前</span> </div>
				</div>
			</div>
			<div id="tab2">
            	
				<div class="formitm">
					<label class="lab" >副栏目名称：</label>
					<div class="ipt">
						<input name="subname" type="text" class="u-ipt" value="{$info.subname}" />
						<span class="Validform_checktip">页面头部信息的副标题</span>
					</div>
				</div>
				<div class="formitm">
					<label class="lab" >栏目URL优化：</label>
					<div class="ipt">
						<input name="urlname" type="text" class="u-ipt" value="{$info.urlname}" />
						<span class="Validform_checktip">栏目英文名称，不能含有特殊符号</span> </div>
				</div>
				<div class="formitm">
					<label class="lab" >关键词：</label>
					<div class="ipt">
						<input name="keywords" type="text" class="u-ipt" value="{$info.keywords}" />
						<span class="Validform_checktip">关键词以,号分割</span> </div>
				</div>
				<div class="formitm">
					<label class="lab" >描述：</label>
					<div class="ipt">
						<textarea name="description" class="u-itt" >{$info.description}</textarea>
						<span class="Validform_checktip">针对本栏目的描述</span> </div>
				</div>
				<div class="formitm">
					<label class="lab" >SEO内容：</label>
					<div class="ipt">
						<textarea name="seo_content" class="u-itt" >{$info.seo_content}</textarea>
						<span class="Validform_checktip">针对SEO优化的特定内容</span> </div>
				</div>
                <div class="formitm">
					<label class="lab" >页面显示：</label>
					<div class="ipt">
						<div class="txt">
							<?php if(!isset($info['show'])){ $info['show']=1; } ?>
							<input name="show" type="radio" value="1" <!--if:{$info['show']==1}-->checked="checked"<!--{/if}--> />
							显示
							&nbsp;&nbsp; <input name="show" type="radio" value="0" <!--if:{$info['show']==0}-->checked="checked"<!--{/if}--> />
							隐藏
						</div>
						<span class="Validform_checktip">只控制导航内的栏目显示</span> </div>
				</div>
			</div>
			<div class="formitm formitm-1">
				<button class="u-btn" id="submit" type="submit">保存修改</button>
				<button class="u-btn u-btn-c4" id="reset" type="button">重置</button>
				<span id="tip" class="load"></span>
			</div>
		</fieldset>
		<input name="file_id" id="file_id" type="hidden" value="{$file_id}" />
		<input name="cid" type="hidden" value="{$info.cid}" />
	</form>
</div>
</body>
<?php echo api('editor','get_upload_image',array('button'=>'image_button','id'=>'image',editor=>'content')); ?>

<script>
Do.ready('base','form','tabs','tip', function() {
	saveform('{$url(admin/category/index)}');
	tabs();
	//模板赋值
	function tpl_val(id,val){
		$('#'+id).val(val);
		$.powerFloat.hide();
	}
	function tpl_list(id){
		var list = [ 
		<!--foreach:{$tpl_list $vo}-->
		{
			href: "javascript:tpl_val('"+id+"','{$vo}');",
			text: "{$vo}"
		},
		<!--{/foreach}-->
		{
			text: "请选择使用模板"
		}];
		return list;
	}
		
	function tpl_power(id){
		$("#"+id).powerFloat({
			width: 308,
			eventType: "click",
			edgeAdjust:false,
			reverseSharp:true,
			target:tpl_list(id),
			targetMode: "list"
		});
	}
		
	tpl_power("class_tpl");

});

</script>